﻿/**
 * 
 * @file MaterialDialogFluid.h
 * @brief 流体材料对话框声明
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-12-06
 * 
 */
#ifndef __GUIMaterialFluidDialog_H__
#define __GUIMaterialFluidDialog_H__

#include "AbstractPhysicsDialog.h"

namespace Ui 
{
    class MaterialDialogFluid;
}

namespace GUI
{
    /**
     * @brief 流体材料对话框
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-12-06
     */
    class GUIPhyscisDialogAPI MaterialFluidDialog : public AbstractMaterialDialog
    {
        Q_OBJECT 
    public:
         /**
          * @brief Construct a new Material Fluid Dialog object
          * @param[i]  type           操作类型
          * @param[i]  matid          材料ID
          * @param[i]  parent         父对象
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-12-06
          */
        explicit MaterialFluidDialog(PhysicsDlgExecType type, int matid = -1, QWidget* parent = nullptr);
        /**
         * @brief Destroy the Material Fluid Dialog object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        virtual ~MaterialFluidDialog();
        
    private slots:
        /**
         * @brief 确认按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButtonOK_clicked();
        /**
         * @brief 取消按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButtonCancel_clicked();

    private:
        /**
         * @brief 初始化窗口
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void init();
        /**
         * @brief 检查输入
         * @return true  输入没有错误
         * @return false  输入有错误
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool checkInput();

    private:
         /**
          * @brief UI对象
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-12-06
          */
        Ui::MaterialDialogFluid *_ui{};
    };
}
#endif // GUIMaterialFluidDialog_H
